package test.serverframe.armc.server.manager.dao.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import test.serverframe.armc.server.manager.domain.DatumReferencingAssociation;

public interface DatumReferencingAssociationMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YEW_QB_CL_ZLYYGL
     *
     * @mbg.generated
     */
    @Delete({
        "delete from YEW_QB_CL_ZLYYGL",
        "where ID = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YEW_QB_CL_ZLYYGL
     *
     * @mbg.generated
     */
    @Insert({
        "insert into YEW_QB_CL_ZLYYGL (ID, ZLBH, ",
        "YYLX, YYBH, CZR, ",
        "CZSJ)",
        "values (#{id,jdbcType=VARCHAR}, #{zlbh,jdbcType=VARCHAR}, ",
        "#{yylx,jdbcType=VARCHAR}, #{yybh,jdbcType=VARCHAR}, #{czr,jdbcType=VARCHAR}, ",
        "#{czsj,jdbcType=TIMESTAMP})"
    })
    int insert(DatumReferencingAssociation record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YEW_QB_CL_ZLYYGL
     *
     * @mbg.generated
     */
    @InsertProvider(type=DatumReferencingAssociationSqlProvider.class, method="insertSelective")
    int insertSelective(DatumReferencingAssociation record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YEW_QB_CL_ZLYYGL
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "ID, ZLBH, YYLX, YYBH, CZR, CZSJ",
        "from YEW_QB_CL_ZLYYGL",
        "where ID = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="ID", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="ZLBH", property="zlbh", jdbcType=JdbcType.VARCHAR),
        @Result(column="YYLX", property="yylx", jdbcType=JdbcType.VARCHAR),
        @Result(column="YYBH", property="yybh", jdbcType=JdbcType.VARCHAR),
        @Result(column="CZR", property="czr", jdbcType=JdbcType.VARCHAR),
        @Result(column="CZSJ", property="czsj", jdbcType=JdbcType.TIMESTAMP)
    })
    DatumReferencingAssociation selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YEW_QB_CL_ZLYYGL
     *
     * @mbg.generated
     */
    @UpdateProvider(type=DatumReferencingAssociationSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(DatumReferencingAssociation record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table YEW_QB_CL_ZLYYGL
     *
     * @mbg.generated
     */
    @Update({
        "update YEW_QB_CL_ZLYYGL",
        "set ZLBH = #{zlbh,jdbcType=VARCHAR},",
          "YYLX = #{yylx,jdbcType=VARCHAR},",
          "YYBH = #{yybh,jdbcType=VARCHAR},",
          "CZR = #{czr,jdbcType=VARCHAR},",
          "CZSJ = #{czsj,jdbcType=TIMESTAMP}",
        "where ID = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(DatumReferencingAssociation record);
}